<style>
  @keyframes mykf {
    from {
      background: red;
    }
    to {
      background: yellow;
    }
  }

  div {
    animation: mykf 5s infinite;
  }
</style>

<div style="width: 100px;height: 100px;"></div>